package c.e.b;

import android.content.Context;
import android.content.res.Resources;
import android.text.TextUtils;
import b.i.b.f;
import c.e.a.b.b.h.h;
import c.e.a.b.b.j.g;
import java.util.Arrays;
import java.util.Objects;

/* compiled from: FirebaseOptions */
public final class e {
    public final String a;
    public final String b;
    public final String c;
    public final String d;
    public final String e;
    public final String f;
    public final String g;

    public e(String str, String str2, String str3, String str4, String str5, String str6, String str7) {
        f.U(g.a(str) ^ 1, "ApplicationId must be set.");
        this.b = str;
        this.a = str2;
        this.c = str3;
        this.d = str4;
        this.e = str5;
        this.f = str6;
        this.g = str7;
    }

    public static e a(Context context) {
        CharSequence charSequence;
        Objects.requireNonNull(context, "null reference");
        Resources resources = context.getResources();
        String resourcePackageName = resources.getResourcePackageName(2131689759);
        String str = "string";
        int identifier = resources.getIdentifier("google_app_id", str, resourcePackageName);
        e eVar = null;
        if (identifier == 0) {
            charSequence = null;
        } else {
            charSequence = resources.getString(identifier);
        }
        if (TextUtils.isEmpty(charSequence)) {
            return null;
        }
        String str2;
        String str3;
        String str4;
        String str5;
        String str6;
        int identifier2 = resources.getIdentifier("google_api_key", str, resourcePackageName);
        if (identifier2 == 0) {
            str2 = null;
        } else {
            str2 = resources.getString(identifier2);
        }
        identifier2 = resources.getIdentifier("firebase_database_url", str, resourcePackageName);
        if (identifier2 == 0) {
            str3 = null;
        } else {
            str3 = resources.getString(identifier2);
        }
        identifier2 = resources.getIdentifier("ga_trackingId", str, resourcePackageName);
        if (identifier2 == 0) {
            str4 = null;
        } else {
            str4 = resources.getString(identifier2);
        }
        identifier2 = resources.getIdentifier("gcm_defaultSenderId", str, resourcePackageName);
        if (identifier2 == 0) {
            str5 = null;
        } else {
            str5 = resources.getString(identifier2);
        }
        identifier2 = resources.getIdentifier("google_storage_bucket", str, resourcePackageName);
        if (identifier2 == 0) {
            str6 = null;
        } else {
            str6 = resources.getString(identifier2);
        }
        int identifier3 = resources.getIdentifier("project_id", str, resourcePackageName);
        if (identifier3 != 0) {
            eVar = resources.getString(identifier3);
        }
        return new e(charSequence, str2, str3, str4, str5, str6, eVar);
    }

    public boolean equals(Object obj) {
        boolean z = false;
        if (!(obj instanceof e)) {
            return false;
        }
        e eVar = (e) obj;
        if (f.r0(this.b, eVar.b) && f.r0(this.a, eVar.a) && f.r0(this.c, eVar.c) && f.r0(this.d, eVar.d) && f.r0(this.e, eVar.e) && f.r0(this.f, eVar.f) && f.r0(this.g, eVar.g)) {
            z = true;
        }
        return z;
    }

    public int hashCode() {
        return Arrays.hashCode(new Object[]{this.b, this.a, this.c, this.d, this.e, this.f, this.g});
    }

    public String toString() {
        h hVar = new h(this, null);
        hVar.a("applicationId", this.b);
        hVar.a("apiKey", this.a);
        hVar.a("databaseUrl", this.c);
        hVar.a("gcmSenderId", this.e);
        hVar.a("storageBucket", this.f);
        hVar.a("projectId", this.g);
        return hVar.toString();
    }
}
